from collections import namedtuple
from enum import Enum

import config

layers = [
    ("default", 1),
    ("bottom", 10),
    ("middle", 11),
    ("top", 12),
    ("system", 13),
]
layers = [namedtuple("layer", ["name", "z"])(item[0], item[1]) for item in layers]


class Tags(Enum):
    DEFAULT = 1
    PLAYER = 2
    MAP = 3


class resources:
    _instance = None

    @classmethod
    def instance(cls):
        if None is cls._instance:
            cls._instance = resources()
        return cls._instance

    def __init__(self):
        from utils import load_files
        self.image = load_files(config.path_image)
